-- GENERATED SPELL FOR [Cobalt Serpent] --


function spell0_19428(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(17503,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19428', 6000, 1)
end

function spell1_19428(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(38238,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19428', 8000, 1)
end

function spell2_19428(pUnit, Event) --@Lightning Breath,n/a--
pUnit:FullCastSpellOnTarget(38133,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19428', 1000, 1)
end

function spell3_19428(pUnit, Event) --@Lightning Breath,n/a--
pUnit:FullCastSpellOnTarget(38193,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19428', 644, 1)
end

function spell4_19428(pUnit, Event) --@Wing Buffet,Self--
pUnit:FullCastSpellOnTarget(38110,pUnit)
pUnit:RegisterEvent('Sorts_19428', 1000, 1)
end

function Sorts_19428(pUnit, Event)
local choix_sorts_19428 = math.random(0, 4)
if choix_sorts_19428 == 0 then
pUnit:RegisterEvent('spell0_19428', 1, 1)
end
if choix_sorts_19428 == 1 then
pUnit:RegisterEvent('spell1_19428', 1, 1)
end
if choix_sorts_19428 == 2 then
pUnit:RegisterEvent('spell2_19428', 1, 1)
end
if choix_sorts_19428 == 3 then
pUnit:RegisterEvent('spell3_19428', 1, 1)
end
if choix_sorts_19428 == 4 then
pUnit:RegisterEvent('spell4_19428', 1, 1)
end
end

function mob19428_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19428', math.random(1500, 3000), 1)
end

function mob19428_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19428_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19428_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19428, 1, 'mob19428_Action')
RegisterUnitEvent(19428, 2, 'mob19428_Leave')
RegisterUnitEvent(19428, 3, 'mob19428_Kill')
RegisterUnitEvent(19428, 4, 'mob19428_Die')
